import java.util.ArrayList;
import java.util.List;

public class UserTest {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		User user1 = new UserImpl();
		user1.setAge(28);
		user1.setPassword("aaa");
		user1.setUserName("aaa");

		User user2 = new UserImpl();
		user2.setAge(29);
		user2.setPassword("bbb");
		user2.setUserName("aaa");

		User user3 = new UserImpl();
		user3.setAge(30);
		user3.setPassword("ccc");
		user3.setUserName("aaa");

		User user4 = new UserImpl();
		user4.setAge(31);
		user4.setPassword("ddd");
		user4.setUserName("aaa");

		User user5 = new UserImpl();
		user5.setAge(32);
		user5.setPassword("eee");
		user5.setUserName("aaa");

	
		
		UserService userService = new UserSericeImpl();
		userService.create(user1);
		userService.create(user2);
		userService.create(user3);
		userService.create(user4);
		userService.create(user5);
		
		User u = userService.delete("sadsadad");
		if(u == null) {
			System.out.println("No record Exists");
		}else {
			System.out.println("Record deleted");
		}
		
		
		List<User> userList = userService.getAll();
		
		for(int i = 0; i <userList.size(); i++) {
			System.out.println(userList.get(i));
		}
		
		

	}

}
